home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / aros / intuition / modifyprop.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-12  |  2.3 KB  |  95 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: modifyprop.c,v 1.1 1996/08/28 17:55:35 digulla Exp $
  4.     $Log: modifyprop.c,v $
  5.     Revision 1.1  1996/08/28 17:55:35  digulla
  6.     Proportional gadgets
  7.     BOOPSI
  8.  
  9.  
  10.     Desc:
  11.     Lang: english
  12. */
  13. #include "intuition_intern.h"
  14.  
  15. /*****************************************************************************
  16.  
  17.     NAME */
  18.     #include <intuition/intuition.h>
  19.     #include <clib/intuition_protos.h>
  20.  
  21.     __AROS_LH8(void, ModifyProp,
  22.  
  23. /*  SYNOPSIS */
  24.     __AROS_LHA(struct Gadget    *, gadget, A0),
  25.     __AROS_LHA(struct Window    *, window, A1),
  26.     __AROS_LHA(struct Requester *, requester, A2),
  27.     __AROS_LHA(unsigned long     , flags, D0),
  28.     __AROS_LHA(unsigned long     , horizPot, D1),
  29.     __AROS_LHA(unsigned long     , vertPot, D2),
  30.     __AROS_LHA(unsigned long     , horizBody, D3),
  31.     __AROS_LHA(unsigned long     , vertBody, D4),
  32.  
  33. /*  LOCATION */
  34.     struct IntuitionBase *, IntuitionBase, 26, Intuition)
  35.  
  36. /*  FUNCTION
  37.     Changes the values in the PropInfo-structure of a proportional
  38.     gadget and refreshes the display.
  39.  
  40.     INPUTS
  41.     gadget - Must be a PROPGADGET
  42.     window - The window which contains the gadget
  43.     requester - If the gadget has GTYP_REQGADGET set, this must be
  44.         non-NULL.
  45.     flags - New flags
  46.     horizPot - New value for the HorizPot field of the PropInfo
  47.     vertPot - New value for the VertPot field of the PropInfo
  48.     horizBody - New value for the HorizBody field of the PropInfo
  49.     vertBody - New value for the VertBody field of the PropInfo
  50.  
  51.     RESULT
  52.     None.
  53.  
  54.     NOTES
  55.     This function causes all gadgets from this gadget to the end of
  56.     the gadget list to be refreshed. If you want a better behaviour,
  57.     use NewModifProp().
  58.  
  59.     EXAMPLE
  60.  
  61.     BUGS
  62.  
  63.     SEE ALSO
  64.     NewModifyProp()
  65.  
  66.     INTERNALS
  67.  
  68.     HISTORY
  69.     29-10-95    digulla automatically created from
  70.                 intuition_lib.fd and clib/intuition_protos.h
  71.  
  72. *****************************************************************************/
  73. {
  74.     __AROS_FUNC_INIT
  75.     __AROS_BASE_EXT_DECL(struct IntuitionBase *,IntuitionBase)
  76.     struct PropInfo * pi;
  77.  
  78.     if ((gadget->GadgetType & GTYP_GTYPEMASK) != GTYP_PROPGADGET
  79.     || !gadget->SpecialInfo
  80.     )
  81.     return;
  82.  
  83.     pi = gadget->SpecialInfo;
  84.  
  85.     pi->Flags = flags;
  86.     pi->HorizPot = horizPot;
  87.     pi->VertPot = vertPot;
  88.     pi->HorizBody = horizBody;
  89.     pi->VertBody = vertBody;
  90.  
  91.     RefreshGadgets (gadget, window, requester);
  92.  
  93.     __AROS_FUNC_EXIT
  94. } /* ModifyProp */
  95.